import { BaseContext } from 'koa';
const ccap = require('ccap');

export default (service: any): object => ({
    async get(ctx: BaseContext, next: any) {
        const captcha = ccap({
            quality: 100
        }).get();
        ctx.session.captcha = captcha[0];
        ctx.body = captcha[1];
    }
});